-- ----------------------------------------------------------------------
-- MySQL Migration Toolkit
-- SQL Create Script
-- ----------------------------------------------------------------------

SET FOREIGN_KEY_CHECKS = 0;

CREATE DATABASE IF NOT EXISTS `mpayroll`
  CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `mpayroll`;
-- -------------------------------------
-- Tables

DROP TABLE IF EXISTS `mpayroll`.`department`;
CREATE TABLE `mpayroll`.`department` (
  `id` INT(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `mpayroll`.`designation`;
CREATE TABLE `mpayroll`.`designation` (
  `id` INT(10) unsigned NOT NULL AUTO_INCREMENT,
  `designation` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE = INNODB;

DROP TABLE IF EXISTS `mpayroll`.`employee`;
CREATE TABLE `mpayroll`.`employee` (
  `empid` INT(10) unsigned NOT NULL AUTO_INCREMENT,
  `lastname` VARCHAR(45) NOT NULL,
  `firstname` VARCHAR(45) NOT NULL,
  `midname` VARCHAR(45) NULL,
  `dept` INT(10) unsigned NULL,
  `designation` INT(10) unsigned NULL,
  PRIMARY KEY (`empid`)
)
ENGINE = INNODB;



SET FOREIGN_KEY_CHECKS = 1;

-- ----------------------------------------------------------------------
-- EOF

